<!DOCTYPE html>
<html lang="ru">
<head>
	<base href="$FLUTTER_BASE_HREF">

	<meta charset="UTF-8">
	<meta content="IE=Edge" http-equiv="X-UA-Compatible">
	<meta name="description" content="website">

	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-title" content="Angry Words">
	<link rel="apple-touch-icon" href="icons/Icon-192.png">

	<link rel="icon" type="image/png" href="favicon.png"/>

	<title>Angry Words</title>
	<link rel="manifest" href="manifest.json">
	<link rel="stylesheet" type="text/css" href="splash_screen.css">
	<link rel="stylesheet" type="text/css" href="loader.css">

	<script>
    var serviceWorkerVersion = null;
	</script>
	<script src="flutter.js" defer></script>
</head>
<body>
<div id="loader">
	<div class="dot-pulse"></div>
</div>
<script>
  if ('serviceWorker' in navigator) {
    window.addEventListener('flutter-first-frame', function () {
      navigator.serviceWorker.register('flutter_service_worker.js');
    });
  }
</script>
<!--<script src="main.dart.js" type="application/javascript"></script>-->
<script>
  // window.addEventListener('load', async () => {
  //   window.setTimeout(() => {
  //     let loader = document.querySelector('#loader');
	//
  //     if (loader) {
  //       loader.style.display = 'flex'
  //     }
  //   }, 500)
  // })

  window.addEventListener('load', async () => {
    window.setTimeout(() => {
      let loader = document.querySelector('#loader');

      if (loader) {
        loader.style.display = 'flex'
      }
    }, 500)

    let engineInitializer = await _flutter.loader.loadEntrypoint({
      serviceWorker: {
        serviceWorkerVersion: serviceWorkerVersion,
      },
    })

    let appRunner = await engineInitializer.initializeEngine()

    let loader = document.querySelector('#loader')

    if (loader) {
      loader.remove()
    }

    await appRunner.runApp()
  });
</script>
</body>
</html>
